﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.OleDb;

namespace SAHCPIMS_final
{
    public partial class HOME : Form
    {

        public string homeEmpName;
        public int homeEmpNum;

        public HOME()
        {
            InitializeComponent();
        }

        private void HOME_Load(object sender, EventArgs e)
        {
            empNumLabel.Text = homeEmpNum.ToString();
            employeeLabel.Text = homeEmpName;
        }

        private void addfamilybutton_Click(object sender, EventArgs e)
        {   
            ADDFAMILY addFamilyForm = new ADDFAMILY();
            addFamilyForm.homeEmpName = homeEmpName;
            addFamilyForm.homeEmpNum = homeEmpNum;
            addFamilyForm.Visible = true;
            this.Visible = false;
        }

        private void searchbutton_Click(object sender, EventArgs e)
        {
            SEARCH searchForm = new SEARCH();
            searchForm.homeEmpNum = homeEmpNum;
            searchForm.homeEmpName = homeEmpName;
            searchForm.Visible = true;
            this.Visible = false;
        }

        private void logOutButton_Click(object sender, EventArgs e)
        {
            LOGIN logout = new LOGIN();
            logout.Visible = true;
            this.Visible = false;
        }
    }
}
